﻿using System.Collections.Generic;

namespace CPN.PJN.Silverlight.Extensions.Validation
{
    public class RequiredValidator<T> : ValidatorBase<T>
    {
        public RequiredValidator()
        {
            this.DefaultMessage = "Ce champs est requis";
        }
        
        public override bool Validate(T value)
        {
            return !EqualityComparer<T>.Default.Equals(value, default(T));
        }
    }
}
